#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    void (Widget::*str)(QString)=&Widget::Mysignal;
    void (Widget::*slo)(QString)=&Widget::Myslot;
    connect(this,str,this,slo);
    EmitSignal();
}

Widget::~Widget()
{
    delete ui;
}

void Widget::Myslot()
{
    qDebug()<<"无参"<<endl;
}
void Widget::Myslot(QString str)
{
    qDebug()<<"有参"<<str<<endl;
}
void Widget::EmitSignal()
{
    emit this->Mysignal();
    emit this->Mysignal("hello");
}
//void Widget::Mysignal()
